package com.hongye.area.dao;

import com.hongye.area.entity.CityEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hongye.area.pojo.CityPojo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * 
 * 
 * @author cyj
 * @email sunlightcs@gmail.com
 * @date 2022-04-22 16:19:01
 */
@Mapper
public interface CityDao extends BaseMapper<CityEntity> {

    //修改城市表中市级 状态
    @Update("update tb_city set `state` = #{state} where `id`= #{id} ")
    int updataCityState(@Param("id") Integer id, @Param("state") Integer state);

    List<CityPojo> findCityAndCounty(@Param("pid") Integer pid);

}
